import {CommonModel} from "./commonModel.ts";

export namespace NAMESPACE_USER {

    import Model = CommonModel.Model;
    import PageQuery = CommonModel.PageQuery;

    //用户基本信息
    export interface UserBase {
        username?: string
        name?: string
        mobile?: string
        email?: string
        password?: string
        idCard?: string
        uid?: string
        state?: number //-1 锁定状态 0 初始化状态（需要修改密码） 1 正常未登录 2 正常登录状态
    }

    export interface UserLogin {
        username: string
        password: string
    }

    export interface UserChangPassword {
        uid:string
        password:string
        oldPassword:string
    }

    export interface UserDel{
        ids:Array<string>
    }

    export interface UserQuery extends UserBase,Model,PageQuery{}

    export interface UserItem extends UserBase,Model{
    }

    export interface UserAddGroup{
        uids:Array<string>
        userGroupIds:Array<number>
    }

    //-----------------分割线 -----------------

    export interface UserGroupBase{
        parentId?:number
        name?:string
        intro?:string
        state?:number
    }

    export interface UserGroupDel{
        ids:Array<number>
    }
    export interface UserGroupQuery extends UserGroupBase,Model,PageQuery{}

    export interface UserGroupItem extends UserGroupBase,Model{}

    export interface UserGroupUpdate extends Model{}

    //-----------------分割线 -----------------

    export  interface RoleBase{
        parentId?:number,
        name?:string,
        intro?:string
        state?:number
    }

    export interface RoleDel{
        ids:Array<Number>
    }

    export interface RoleQuery extends RoleBase,Model,PageQuery{}

    export interface RoleItem extends RoleBase,Model{}


    //-----------------分割线 -----------------
   export interface PermissionBase{
        parentId?:number,
        name?:string,
        code?:number
        intro?:string
    }

    export interface PermissionDelDTO {
        ids:Array<Number>
    }

    export interface PermissionQuery extends PermissionBase,Model,PageQuery{}

    export interface PermissionItem extends PermissionBase,Model{}


}
